<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:33:"./app/admin\view\login-index.html";i:1594791158;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>登录 - 网家教育资讯管理系统</title>
  <meta name="description" content="particles.js is a lightweight JavaScript library for creating particles.">
  <meta name="author" content="Vincent Garreau" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <script src="/public/layui/css/layui.css"></script>
  <link rel="stylesheet" media="screen" href="/public/css/style.css">
  <link rel="stylesheet" type="text/css" href="/public/css/reset.css"/>
  <script src="/public/layui/layui.js"></script>
</head>
<body>

<div id="particles-js">
		<div class="login">
			<div class="login-top">
				登录
			</div>
			<form class="layui-form" action="">
			<div class="login-center clearfix">
				<div class="login-center-img"><img src="/public/img/name.png"/></div>
				<div class="login-center-input">
					<input type="text" name="name" value="" placeholder="请输入您的用户名" onfocus="this.placeholder=''"  required  lay-verify="required" onblur="this.placeholder='请输入您的用户名'"/>
					<div class="login-center-input-text">用户名</div>
				</div>
			</div>
			<div class="login-center clearfix">
				<div class="login-center-img"><img src="/public/img/password.png"/></div>
				<div class="login-center-input">
					<input type="password" name="password" value="" placeholder="请输入您的密码" onfocus="this.placeholder=''" required  lay-verify="required" onblur="this.placeholder='请输入您的密码'"/>
					<div class="login-center-input-text">密码</div>
				</div>
			</div>
			<div align="center">
			<button style="border: none;" class="login-button" lay-submit lay-filter="login_index">登陆</button>
			</div>
			</form>
		</div>
		<div class="sk-rotating-plane"></div>
</div>
<script src="/public/js/particles.min.js"></script>
<script src="/public/js/app.js"></script>
<script>
layui.use('form',function(){
  var form = layui.form
  ,jq = layui.jquery;

  form.on('submit(login_index)', function(data){
    loading = layer.load(2, {
      shade: [0.2,'#000']
    });
    var param = data.field;
    jq.post('<?php echo url("login/index"); ?>',param,function(data){
      if(data.code == 200){
        layer.close(loading);
        layer.msg(data.msg, {icon: 1, time: 1000}, function(){
          location.href = '/admin.php';
        });
      }else{
        layer.close(loading);
        layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
      }
    });
    return false;
  });

})
</script>

 
</body>
</html>